package com.hqyj.controller;

import com.hqyj.pojo.PrivateCustomer;
import com.hqyj.service.service.PrivateCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Controller
@RequestMapping("/private")
public class privateCustomerController {
    @Autowired(required = false)
    PrivateCustomerService privateCustomerService;

    @ResponseBody
    @RequestMapping("/customer")
    public HashMap<String,Object> getPrivateCustomer(String manager){
        List<PrivateCustomer> privateCustomerList = new ArrayList<>();
        privateCustomerList = privateCustomerService.getPrivatecustomer(manager);
        HashMap<String,Object> map = new HashMap<String,Object>();
        map.put("data",privateCustomerList);
        return map;
    }
}
